<?php echo $this->element('right_panel'); ?>
<div id="left_panel">
		<?php 
			if ($song['Sitemask']['embedurl']){
		echo '<h2 class="song_title" id="song_title_'.$song['Song']['id'].'">';
		echo "\n";
		echo $song['Song']['title'];
		echo ' (<a href=http://'.$song['Song']['url'].' target="_blank">'.$song['Sitemask']['name'].'</a>)</h2>';
		} else {
			echo '<h2 class="only_url">';
		echo '<a href=http://'.$song['Song']['url'].' target="_blank">'.$song['Song']['title'].'</a></h2>';
		}?>
<?php
$i = 0;
foreach ($songs as $song):
	$class = null;
?>
<?php  
$up=null;
$down=null;
foreach ($scores as $s => $o) { 
	if($o['Score']['song_id']==$song['Song']['id']){
		if($o['Score']['direction']=='0'){
			$down=true;
		} else if ($o['Score']['direction']=='1'){
			$up=true;
		}
	}
}?>
<table>
<tr>
<td class="score_td">
				<div id="up_arrow_<?php echo $song['Song']['id']; ?>" <?php if ($up){echo 'class="arrow_up_hit"';} else { echo 'class="arrow_up"';} ?>></div>
<div class="score">
<p id="score_<?php echo $song['Song']['id']; ?>" class="score"><?php echo $song['Song']['score']; ?></p></div>
			<div id="down_arrow_<?php echo $song['Song']['id']; ?>" <?php if ($down){echo 'class="arrow_down_hit"';} else { echo 'class="arrow_down"';} ?>></div>
</td>
<td>
		<?php 
			if ($song['Sitemask']['embedurl']){
			echo '<div id="song_play_'.$song['Song']['id'].'">';
			echo $song['Sitemask']['embedurl'];
		echo '</div>';
			} ?>
<p>
Submited by 
			<?php echo $this->Html->link($song['User']['username'], array('controller' => 'users', 'action' => 'view', $song['User']['id'])); ?>
 at 
		<?php echo $song['Song']['date']; ?>
		to 
			<?php echo $this->Html->link($song['Category']['title'], array('controller' => 'categories', 'action' => 'view', $song['Category']['id'])); ?>
</p>
<p>
<div class="com_sh">
 <span id="share_it">Share it:</span>
<a href="http://www.facebook.com/sharer.php?u=http://www.audivit.com/songs/view/<?php echo $song['Song']['id'] ?>%23song_title_<?php echo $song['Song']['id'] ?>&amp;t=<?php echo $song['Song']['title'] ?>" target="_blank">
<?php echo $this->Html->image('fb.png', array('title' => 'Share on Facebook!'))?></a>
<a href="http://twitter.com/home?status=is listening to <?php echo $song['Song']['title'] ?> at site with user picked music - http://www.audivit.com/songs/view/<?php echo $song['Song']['id'] ?>" target="_blank">
<?php echo $this->Html->image('twitter.png', array('title' => 'Share on Twitter!'))?></a>
<div class="g-plusone" data-size="small" data-count="false"></div>
</div>
</p>
</td>
</tr>
</table>
<?php endforeach; ?>
<div id="post-comments">
		<?php $commentWidget->options(array('allowAnonymousComment' => true));?>
		<?php echo $commentWidget->display();?>
	</div>

</div>
